package com.pp.demo.module.api.service;

import com.pp.demo.module.api.entity.SeckillActivity;
import com.baomidou.mybatisplus.extension.service.IService;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author pzh
 * @since 2025-07-14 09:45:25
 */
public interface SeckillActivityService extends IService<SeckillActivity> {

    /**
     * 列出所有有效活动
     * @param status
     * @param now
     * @return
     */
    List<SeckillActivity> listValidActivities(Boolean status, LocalDateTime now);

    /**
     * 减库存
     * @param activityId
     * @return
     */
    int decreaseStock(long activityId);
}
